<div class="goods">
    <el-row>
        <el-col>
            <el-button type="success" plain @click="$router.push('/goods-add')">添加商品</el-button>
        </el-col>
    </el-row>
    <!-- 商品列表 -->
    <el-table
      :data="goodsList"
      highlight-current-row
      style="width: 100%">
      <el-table-column
        type="index"
        width="50">
      </el-table-column>
      <el-table-column
        prop="goods_name"
        label="商品名称"
        width="150">
      </el-table-column>
      <el-table-column
        prop="goods_price"
        label="商品价格"
        width="120">
      </el-table-column>
      <el-table-column
        prop="goods_weight"
        label="商品重量"
        width="120">
      </el-table-column>
      <el-table-column
        prop="add_time"
        label="创建时间"
        width="150">
      </el-table-column>
      <!-- 自定义列 -->
      <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button type="primary" icon="el-icon-edit" plain size="mini"></el-button>
            <el-button type="danger" icon="el-icon-delete" plain size="mini"></el-button>
          </template>
      </el-table-column>
    </el-table>
    <!-- 分页功能 -->
    <el-pagination
      background
      layout="prev, pager, next"
      :total="total"
      :current-page="pagenum"
      :page-size="pagesize"
      @current-change="changePage">
    </el-pagination>
</div>
